package edu.cuit.avatar.net;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * @author <a href="mailto:1020zhaodan@163.com">Adan</a>
 * @version 1.0
 * @date 2025/7/18 13:40
 */
public class InetAddressTest {
    public static void main(String[] args) throws UnknownHostException {
        InetAddress address = InetAddress.getByName("www.163.com");
        System.out.println("host name:" + address.getHostName());
        System.out.println("host ip:" + address.getHostAddress());
    }
}
